package com.jlect.swebing.renderers.client;

/**
 * Mouse event class for renderers api
 *
 * @author Sergey Kozmin
 * @since 24.11.2007 15:30:26
 */
public class RendererKeyEvent extends AbstractRendererEvent {
    /**
     * Type of the key event.
     * @see RendererEventConstants constants
     */
    private int eventType;
    private int key;

    public RendererKeyEvent(Renderer source, int eventType, int modifiers, int key) {
        init(source, eventType, modifiers, key);
    }

    public void init(Renderer source, int eventType, int modifiers, int key) {
        init(source, modifiers);
        this.eventType = eventType;
        this.key = key;
    }

    public int getKey() {
        return key;
    }

    public void setKey(int key) {
        this.key = key;
    }

    public int getEventType() {
        return eventType;
    }

    public String toString() {
        return "RendererKeyEvent{" +
                "eventType=" + eventType +
                ", key=" + key +
                "} " + super.toString();
    }
}